// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 获取运行状态列表 GET /api/device/attr */
export async function queryOperationAnalysis(
  params: {
    // query
    /** 设备类型 */
    type?: number;
    /** 区域id*/
    areaId?:number;
   
  },
  options?: { [key: string]: any },
) {
  return request<API.RequestData>('/api/operationAnalysis', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}



export async function totalDeviceState(
  params: {
    // query
    /** 设备类型 */
    typeId?: number;
    /** 区域id*/
    areaId?:number;
   
  },
  options?: { [key: string]: any },
) {
  return request<API.RequestData>('/api/totalDeviceState', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}


export async function totalRunStateByState(
  params: {
    // query
    /** 设备类型 */
    typeId?: number;
    /** 区域id*/
    areaId?:number;
    /** 设备类型 */
    //报表类型 日 月  年
    type?: string;
    //报表时间
    date?: string;
   
  },
  options?: { [key: string]: any },
) {
  return request<API.RequestData>('/api/totalRunStateByState', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}


export async function totalRunStateByDevice(
  params: {
    // query
    /** 设备类型 */
    typeId?: number;
    /** 区域id*/
    areaId?:number;
   
  },
  options?: { [key: string]: any },
) {
  return request<API.RequestData>('/api/totalRunStateByDevice', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

export async function runStateByDevice(
  params: {
    // query
    /** 设备id */
    deviceId: number;
  
   
  },
  options?: { [key: string]: any },
) {
  return request<API.RequestData>('/api/runStateByDevice', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

